<?php

class Application_Form_Login extends Zend_Form {

    public function init() {
        $this->setName('loginForm');

        $username = new Zend_Form_Element_Text('username');
        $username->setLabel('Username: ')
                ->setRequired();
//        $pswRegex = new Zend_Validate_Regex('((?=.*\d)(?=.*[a-z])(?=.*[A-Z]).{5,20})');
//        $pswRegex->setMessage("6 a 20 caracteres, au moins 1 chiffre, au moins une majuscule");
        $psw = new Zend_Form_Element_Password('password');
        $psw->setLabel('Mot de passe:')
//                ->addValidator($pswRegex)
                ->setRequired();
        $login = new Zend_Form_Element_Submit('login');
        $login->setLabel('Login');
        $this->addElements(array($username, $psw, $login));
    }

}

